package com.api.predict.dao;

import com.api.core.ApiMapper;
import com.api.predict.model.Predict;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author RenQiang
 * @date 2021/6/5
 */
@Mapper
public interface PredictMapper extends ApiMapper<Predict> {
    /**
     * 分页查询竞猜
     *
     * @param queryParams
     * @param orderParams
     * @return
     */
    List<Predict> list(@Param("queryParams") Map<String, Object> queryParams, @Param("orderParams") Map<String, String> orderParams);

    /**
     * 批量计算参数人数
     *
     * @param predictIds
     * @return
     */
    List<Map<String, Object>> batchSelectRegisteredPersons(@Param("predictIds") List<Long> predictIds);

    /**
     * 计算战队投注人数
     *
     * @param predictId
     * @return
     */
    List<Map<String, Object>> selectTeamRegistrationPersons(Long predictId);
}
